﻿@{
    ViewBag.Title = "View Load Photo";
    Layout = "~/Views/Shared/_PopupLayout.cshtml";
    List<string> files = ViewBag.ItemResults;
}
<script>
    $(document).ready(function() {
        $(".showimage").change(function() {
            if ($(this).is(":checked")) {
                $(".listimage").show();
            } else {
                $(".listimage").hide();
            }
        });

        $(".listimage img").click(function() {
            $(".mainimage").html("<img src='"+$(this).attr("src")+"' />");
        });
    });
</script>
<div style="padding: 10px">
    <h5 style="color: red">Load Code: @ViewBag.Loadcode</h5>
    <div class="row-fluid">
        <div class="span2">
            <input type="button" class="btn btn-primary" value="Open Folder" onclick="window.location='/products/ProductInstructions?path=@Server.UrlEncode(ViewBag.Path)&isShortCut=True'"/>
        </div>
        <div class="span10">
            <label><input type="checkbox" class="cbcheck showimage" /> Show Images Assigned To Order</label>
        </div>
    </div>
    <div class="row-fluid">
        <fieldset class="span4">
            <legend>List Images</legend>
            <div class="border-padding10 listimage" style="display: none; overflow: hidden">
                @foreach (var item in files)
                {
                    <img src="/rdm/getfile?path=@item" style="width: 49%; float: left; margin-right: 2px"/>
                }
            </div>
        </fieldset>
        <div class="span8"> 
            <div class="border-padding10 mainimage" style="margin-top: 18px">
                
            </div>
        </div>
    </div>
    
</div>
